home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 5_8.lha / 5_8 / 5_8b1.h < prev    next >
Text File  |  1993-08-08  |  450b  |  20 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. /    uniform distribution in the interval [low,high)
  6. truct urand : public randint
  7.  
  8.    int low, high;
  9.    urand(int l, int h) { low = l; high = h; }
  10.    int draw();
  11. ;
  12.  
  13. /    exponential distribution random number generator
  14. truct erand : public randint
  15.  
  16.    int mean;
  17.    erand(int m) { mean = m; };
  18.    int draw();
  19. ;
  20.